home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-03
/
advbas9b.zip
/
ADVBAS.QRF
< prev
next >
Wrap
Text File
|
1990-02-09
|
20KB
|
489 lines
ADVBAS v99B Quick Reference
Note: variable names here are chosen for special clarity and may not match
those found in the ADVBAS.DOC file. The names of the variables used are not
important per se and may be readily changed. This is a quick reference for
your convenience and is not intended to be used without the ADVBAS.DOC
manual.
AddMatI Add an integer to an array.
DSeg% = VARSEG(Array%(1))
DOfs% = VARPTR(Array%(1))
CALL AddMatI(DSeg%, DOfs%, ArraySize%, Value%, ErrCode%)
Any2Dec Convert an integer in any base (2-35) to decimal (base 10).
CALL Any2Dec(Number$, NumBase%, Result%, ErrCode%)
BkScroll Scroll part of the screen backwards or clear it.
CALL BkScroll(LeftCol%, TopRow%, RtCol%, BotRow%, Times%)
BkSpace Destructive backspace.
CALL BkSpace(Column%, Row%)
LOCATE Row%, Column%
BlockMove Copy information from one area of memory to another.
Direction: 0 forward, nonzero backward
CALL BlockMove(FromSeg%, FromOfs%, ToSeg%, ToOfs%,
Bytes%, Direction%)
BSq Squeeze the blanks out of a text string by encoding it.
CALL BSq(St$, SLen%)
St$ = LEFT$(St$, SLen%)
BUsqLen Tell how long a BSq'ed string will be once unsqueezed.
CALL BUsqLen(St$, SLen%)
OrigSt$ = SPACE$(SLen%)
BUsq Unsqueeze a BSq'ed string (use this -after- BUsqLen).
CALL BUsq(St$, OrigSt$)
CalcAttr Calculate attribute (for Xqprint, etc) from colors.
CALL CalcAttr(ForeGround%, BackGround%, Attribute%)
Carrier Get modem Carrier Detect status. Status: 0 off, nonzero on.
CALL Carrier(CommPort%, CD%)
Checksum Calculate Xmodem-type checksum for a string.
CALL Checksum(St$, Chksum%)
ClrEOL Clear to the end of the current screen line.
CALL ClrEOL
ClrKbd Clear the keyboard buffer of any pending keys.
CALL ClrKbd
CopyFile Copies a file.
CALL CopyFile(FromFile$ + CHR$(0), ToFile$ + CHR$(0), ErrCode%)
CRC Calculate Xmodem-type Cyclical Redundancy Check for a string.
CALL CRC(St$, HiCRC%, LoCRC%)
Crunch Convert all sequences of a given char to a single character.
CALL Crunch(St$, Ch$, SLen%)
St$ = LEFT$(St$, SLen%)
DataSeg Return BASIC's Data Segment.
CALL DataSeg(DSeg%)
Date2Int Squeeze a date to a single integer.
CALL Date2Int(Mnth%, Day%, Year%, Result%)
DateN2S Convert a date from numeric to string form.
CALL DateN2S(Mnth%, Day%, Year%, Result$)
DateS2N Convert a date from string to numeric form.
CALL DateS2N(Mnth%, Day%, Year%, DateSt$)
Dec2Any Converts a decimal (base 10) integer to any base (2-35).
CALL Dec2Any(Number%, NumBase%, Result$, RLen%)
Result$ = RIGHT$(Result$, RLen%)
Delay Delays for a given number of seconds.
CALL Delay(Seconds%)
Delay18th Delays for a given number of 18ths of seconds.
CALL Delay18th(FracSeconds%)
DelChr Delete a char from the specified screen location.
CALL DelChr(Row%, Column%)
DelSub Delete a subdirectory.
CALL DelSub(SubDir$ + CHR$(0), ErrCode%)
DiskStat Returns disk status information.
CALL DiskStat(Drive$, FreeClusters%, Clusters%,
BytesPerSector%, SectorsPerCluster%)
DmPrint Displays a string using only DOS functions.
CALL DmPrint(St$)
DOSInkey Get a character from the DOS standard input device.
CALL DOSInkey(ChrCode%, ChrType%)
DrvSpace Return free space left on disk (error returns negative value).
CALL DrvSpace(Drive$, A%, B%, C%)
FreeSpace& = CLNG(A%) * CLNG(B%) * CLNG(C%)
DTR Set the comm signal DTR. DTRState: 0 off, nonzero on.
CALL DTR(CommPort%, DTRState%)
Equipment Return hardware configuration: K of RAM and I/O ports.
CALL Equipment(Memory%, Parallel%, Serial%, Joystick%)
Exist See if a given file exists (no wildcards).
CALL Exist(File$ + CHR$(0), FileExists%)
IF FileExists% THEN PRINT "File exists"
Extract Extract a substring from a string using a given delimiter.
CALL Extract(St$, Delim$, Index%, Start%, SLen%)
SubStr$ = MID$(St$, Start%, SLen%)
FClose Close a file opened by FOpen or FCreate.
CALL FClose(Handle%)
FCreate Create a file or truncate an existing one.
Attribute: 0 normal, 2 hidden
CALL FCreate(File$ + CHR$(0), Attr%, Handle%, ErrCode%)
FindFirstF Get a file using wildcards (used for first call). See also
FindNextF, GetNameF, GetAttrF, GetDateF, GetTimeF, GetSizeF.
CALL FindFirstF(File$ + CHR$(0), Attr%, ErrCode%)
FindNextF Get the next file using wildcards (see FindFirstF et al).
CALL FindNextF(ErrCode%)
FOpen Open an existing file.
ReadWrite: 0 read, 1 write, 2 read/write
Sharing: 0 none, 1 exclude, 2 deny wrt, 3 deny read, 4 deny none
CALL FOpen(File$ + CHR$(0), ReadWrite%, Sharing%, Handle%,
ErrCode%)
FRead Read from a file opened by FOpen or FCreate.
DSeg% = VARSEG(Buffer)
DOfs% = VARPTR(Buffer)
CALL FRead(Handle%, DSeg%, DOfs%, Bytes%, BytesRead%, ErrCode%)
FSetEnd Move to the end of an open file (for appending).
CALL FSetEnd(Handle%)
FSetRec Move to a given record of an open file.
CALL FSetRec(Handle%, RecSize%, RecNumber%)
FWrite Write to a file opened by FOPEN or FCREATE.
DSeg% = VARSEG(Buffer)
DOfs% = VARPTR(Buffer)
CALL FWrite(Handle%, DSeg%, DOfs%, Bytes%, BytesWrit%, ErrCode%)
GetAttrF Get the attribute of a file found with FindFirstF/FindNextF.
Attribute: 1 readonly, 2 hidden, 4 system, 8 volume label,
16 subdir, 32 archive. Attributes are additive,
except volume label, which is exclusive.
CALL GetAttrF(Attr%)
GetCRT Get the display type (0: mono, -1: color).
CALL GetCRT(DisplayType%)
GetDateF Get the date of a file found with FindFirstF/FindNextF.
CALL GetDateF(Mnth%, Day%, Year%)
GetDOSv Get the current DOS version.
CALL GetDOSv(MajorV%, MinorV%)
GetDrv Get the current default disk drive.
Drive$ = "x"
CALL GetDrv(Drive$)
GetExtM Get amount of extended memory (AT-compatible systems only).
CALL GetExtM(KILOBYTES%)
GetFAttr Get the attribute of a file.
Attribute: 1 readonly, 2 hidden, 4 system, 8 volume label,
16 subdir, 32 archive. Attributes are additive,
except volume label, which is exclusive.
CALL GetFAttr(File$ + CHR$(0), Attr%)
GetFDate Get the date of a file. If error, Mnth is set to -1.
CALL GetFDate(File$ + CHR$(0), Mnth%, Day%, Year%)
GetFTime Get the (24hr) time of a file. If error, Hour is set to -1.
CALL GetFTime(File$ + CHR$(0), Hour%, Minute%, Second%)
GetKbd Get the status of the keyboard toggles.
CALL GetKbd(Insert%, CapsLock%, NumLock%, ScrollLock%)
GetKey Wait for and return one of a specified list of keys.
Ky$ = " "
CALL GetKey(GoodKey$, Ky$)
GetLIMm Returns the status of expanded memory in the system.
CALL GetLIMm(TotalPages%, FreePages%)
' 16 bytes per page
GetLine Returns a selected line from a saved screen (see ScrSave).
St$ = SPACE$(80)
DSeg% = VARSEG(Buffer)
DOfs% = VARPTR(Buffer)
CALL GetLine(DSeg%, DOfs%, Row%, St$, SLen%)
St$ = LEFT$(St$, SLen%)
GetNameF Get the filename of a file found using FindFirstF/FindNextF.
File$ = SPACE$(12)
CALL GetNameF(File$, FLen%)
File$ = LEFT$(File$, FLen%)
GetScreen Get and save any part of any screen page into a buffer.
DSeg% = VARSEG(Buffer)
DOfs% = VARPTR(Buffer)
CALL GetScreen(DSeg%, DOfs%, TopRow%, LeftCol%, BottomRow%,
RightCol%, Page%, ScrMode%)
GetSizeF Get the size of a file found using FindFirstF/FindNextF.
CALL GetSizeF(SizeLo%, SizeHi%)
Tmp& = SizeLo% + (SizeLo% < 0) * 65536&
FileSize& = CLNG(SizeHi%) * 65536& + Tmp%
GetSub Get the default subdirectory.
SubDir$ = SPACE$(64)
CALL GetSub(SubDir$, SLen%)
SubDir$ = "\" + LEFT$(SubDir$, SLen%)
GetTimeF Return the time of a file found using FindFirstF/FindNextF.
CALL GetTimeF(Hour%, Minute%, Second%)
InsChr Insert a space at the specified screen location.
CALL InsChr(Row%, Column%)
Int2Date Unsqueeze a date compressed by Date2Int.
CALL Int2Date(Mnth%, Day%, Year%, SqzDate%)
Int2Time Unsqueeze a time compressed by TIME2INT.
CALL Int2Time(Hour%, Minute%, Second%, SqzTime%)
KeyPress Returns nonzero if a key is waiting in the keyboard buffer.
CALL KeyPress(KeyHit%)
LoCase Convert uppercase characters to lowercase.
CALL LoCase(St$)
LRotate Rotate the characters in a string left once.
CALL LRotate(St$)
MakeSub Make a subdirectory.
CALL MakeSub(SubDir$ + CHR$(0), ErrCode%)
MakeWindow Makes a pop-up window.
Frame: 0 none, 1 single lines, 2 double lines,
3 double v single h, 4 single v double h
Type: 0 normal, 1 growing, 2 shadowed, 3 growing shadowed
CALL MakeWindow(LeftCol%, TopRow%, RightCol%, BottomRow%,
Label$, Frame%, WType%, Fore%, Back%, Page%)
MDelChr Delete char at current cursor position, obeying MWindow.
CALL MDelChr
MInsChr Insert space at current cursor position, obeying MWindow.
CALL MInsChr
MLoad Replacement for the BASIC statement, BLOAD.
CALL MLoad(File$ + CHR$(0))
MmButton Returns which mouse buttons are currently pressed.
CALL MmButton(LeftButton%, RightButton%)
MmCheck Returns status of mouse & number of buttons. Resets mouse.
CALL MmCheck(Buttons%)
IF Buttons% = 0 THEN PRINT "No mouse is installed."
MmClick Returns which mouse buttons were clicked since last check.
CALL MmClick(LeftButton%, RightButton%)
MmCursorOff Makes the mouse cursor invisible.
CALL MmCursorOff
MmCursorOn Makes the mouse cursor visible.
CALL MmCursorOn
MmGetLoc Returns the position of the mouse cursor.
CALL MmGetLoc(Column%, Row%)
MmSetLoc Sets the position of the mouse cursor.
CALL MmSetLoc(Column%, Row%)
MmSetRange Sets the range of permissible values for the mouse cursor.
CALL MmSetRange(LeftCol%, TopRow%, RightCol%, BottomRow%)
Month Returns the name of the month, given its number.
Mnth$ = SPACE$(9)
CALL MONTH(Mnth$, MLen%, MonthNum%)
Mnth$ = LEFT$(Mnth$, MLen%)
MPrintC Display a character using DOS calls, obeying MWindow.
CALL MPrintC(Ch$, Column%, Row%)
LOCATE Row%, Column%
MPrint Display a string using DOS calls, obeying MWindow.
CALL MPrint(St$, Column%, Row%)
LOCATE Row%, Column%
MultiAND Performs an AND on each character of a string.
CALL MultiAND(St$, ANDvalue%)
MultiOR Performs an OR on each character of a string.
CALL MultiOR(ST$, ORvalue%)
MultiXOR Performs an XOR on each character of a string.
CALL MultiXOR(St$, XORvalue%)
MWindow Set up a screen window for MPrint/MPrintC/MInsChr/MDelChr.
CALL MWindow(LeftCol%, TopRow%, RightCol%, BottomRow%)
PrintScreen Send the current screen display to the first printer.
CALL PrintScreen
PutScreen Put a saved area of the screen back at a given location.
DSeg% = VARSEG(Buffer)
DOfs% = VARPTR(Buffer)
CALL PutScreen(DSeg%, DOfs%, TopRow%, LeftCol%, BottomRow%,
RightCol%, Page%, ScrMode%)
QPrint Quick print to screen. Doesn't understand control codes.
CALL QPrint(St$, Row%, Column%)
ReadBitF Returns a value from an array of arbitrary (1-8) bit length.
DSeg% = VARSEG(Array%(1))
DOfs% = VARPTR(Array%(1))
CALL ReadBitF(DSeg%, DOfs%, Index%, BitLength%, Value%)
ReColor Switch everything on the screen of one color to another (text).
CALL CalcAttr(OldFore%, OldBack%, OldAttr%)
CALL CalcAttr(NewFore%, NewBack%, NewAttr%)
CALL ReColor(OldAttr%, NewAttr%)
ResetPoint Resets a point on a text screen (0-79 horiz by 0-49 vert).
CALL ResetPoint(X%, Y%)
Reverse Reverse the chars in a string.
CALL Reverse(St$)
RRotate Rotate the chars in a string right once.
CALL RRotate(St$)
Scroll Scroll a section of the screen up or clear it.
CALL Scroll(LeftCol%, TopRow%, RtCol%, BotRow%, Times%)
ScrRest Restore the screen display from an array (see ScrSave).
DSeg% = VARSEG(Buffer)
DOfs% = VARPTR(Buffer)
CALL ScrRest(DSeg%, DOfs%)
ScrRestP Restore the screen display to a given page from an array.
DSeg% = VARSEG(Buffer)
DOfs% = VARPTR(Buffer)
CALL ScrRestP(DSeg%, DOfs%, Page%)
ScrRestPD Restore the screen to a given page with direct screen writes.
DSeg% = VARSEG(Buffer)
DOfs% = VARPTR(Buffer)
CALL ScrRestPD(DSeg%, DOfs%, Page%)
ScrSave Save the current screen display to an array.
DSeg% = VARSEG(Buffer)
DOfs% = VARPTR(Buffer)
CALL ScrSave(DSeg%, DOfs%)
ScrSaveP Save the display on a given screen page to an array.
DSeg% = VARSEG(Buffer)
DOfs% = VARPTR(Buffer)
CALL ScrSaveP(DSeg%, DOfs%, Page%)
ScrSavePD Save a given screen page with direct screen reads to an array.
DSeg% = VARSEG(Buffer)
DOfs% = VARPTR(Buffer)
CALL ScrSavePD(DSeg%, DOfs%, Page%)
SetComm Set a communications port to the given parameters.
Bps ("baud"): 0=300, 1=600, 2=1200, 3=2400, 4=4800, 5=9600,
6=19200, 7=38400, 8=57600
Parity: 0 none, 1 odd, 2 even
CALL SetComm(CommPort%, Bps%, Parity%, WordLength%, StopBits%)
SetDrv Set the default drive.
CALL SetDrv(Drive$)
SetFAttr Set a file's attribute.
Attribute: 1 readonly, 2 hidden, 4 system, 32 archive.
Attributes are additive.
SetFAttr(File$ + CHR$(0), Attr%)
SetFTD Set a file's time and date. If error, returns -1 in Mnth.
CALL SetFTD(File$ + CHR$(0), Mnth%, Day%, Year%,
Hour%, Minute%, Second%)
SetMatI Set each element of an array to specified integer value.
DSeg% = VARSEG(Array%(LBOUND(Array%)))
DOfs% = VARPTR(Array%(LBOUND(Array%)))
CALL SetMatI(DSeg%, DOfs%, ArraySize%, Value%)
SetKbd Set the state of the keyboard toggles.
CALL SetKbd(Insert%, CapsLock%, NumLock%, ScrollLock%)
SetPoint Set a point on a text screen (0-79 horiz by 0-49 vert).
CALL SetPoint(X%, Y%)
SetSub Set the default subdirectory.
CALL SetSub(SubDir$ + CHR$(0), ErrCode%)
ShiftL Shift an integer left by Count bits.
CALL ShiftL(Value%, Count%)
ShiftR Shift an integer right by Count bits.
CALL ShiftR(Value%, Count%)
Soundex Returns the Soundex code for a string.
SoundexCode$ = St$
CALL Soundex(St$, SoundexCode$, SLen%)
SoundexCode$ = LEFT$(SoundexCode$, SLen%)
Strip Strips occurrences of a specified character from a string.
CALL Strip(St$, Ch$, SLen%)
St$ = LEFT$(St$, SLen%)
StripBlanks Strips blanks (and control chars) from left (1), right (2),
or both (3) sides of a string.
CALL StripBlanks(St$, StripWhich%, SLen%)
St$ = LEFT$(St$, SLen%)
StripRange Strips characters within a given range from a string.
CALL StripRange(St$, Lo%, Hi%, SLen%)
St$ = LEFT$(St$, SLen%)
SubExist See if a subdirectory exists (drive specification is allowed).
CALL SubExist(SubDir$ + CHR$(0), SubDirExists%)
IF SubDirExists% THEN PRINT "Subdirectory exists"
TestPoint Tests a point on a text screen (0-79 horiz by 0-49 vert).
CALL TestPoint(X%, Y%, Result%)
Time2Int Squeeze the time down to a single integer.
CALL Time2Int(Hour%, Minute%, Second%, SqzTime%)
TimeN2S Convert a time from numeric to string form.
TimeSt$ = SPACE$(8)
CALL TimeN2S(Hour%, Minute%, Second%, TimeSt$)
TimeS2N Convert a time from string to numeric form.
CALL TimeS2N(Hour%, Minute%, Second%, TimeSt$)
TInstr Search for a given type of character in a string.
Alpha=1, Numeric=2, Symbol=4, Control=8, Graphics=16, Blank=32.
CALL TInstr(St$, ChrType%, Place%)
UpCase Convert a string to uppercase.
CALL UpCase(St$)
WeekDay Return the weekday (1 - 7, Sunday through Saturday).
CALL WeekDay(Day%)
WriteBitF Put a value in an array of arbitrary (1-8) bit length.
DSeg% = VARSEG(Array%(1))
DOfs% = VARPTR(Array%(1))
CALL WriteBitF(DSeg%, DOfs%, Index%, BitLength%, Value%)
Xlate Translates each character of a string using a table
CALL Xlate(Ch$, XlateTable$)
XmPrint Translate a char, and if it's not NUL, display it via DOS.
CALL XmPrint(Ch$, XlateTable$, Column%, Row%)
LOCATE Row%, Column%
XqPrint Extended quick print, with color and page selection.
CALL CalcAttr(ForeGround%, BackGround%, Attr%)
CALL XqPrint(St$, Row%, Column%, Attr%, Page%)
XqPrintD Extended direct quick print, with color and page selection.
CALL CalcAttr(ForeGround%, BackGround%, Attr%)
CALL XqPrintD(St$, Row%, Column%, Attr%, Page%)